package com.consumer.feign.fallback;

import com.consumer.feign.TestService;
import com.pojo.User;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

@Component
public class TestServiceFallback implements TestService {

    @Override
    public String test(String name) {
        return "获取超时，默认返回：小二";
    }

    @Override
    public User getUser(User user) {
        return User.builder().id(1).name("获取超时，默认返回").email("默认返回邮箱").build();
    }

    @Override
    public String upload(MultipartFile file) {
        return "获取超时，默认返回fallback";
    }
}
